import { App } from "vue";

import hasPermission from "@/framework/utils/permission/hasPermission";
import useModal from "@/framework/components/core/draggable-modal";
import permission from "@/framework/core/permission/";
import useDict from "@/framework/core/dict/index";
import useDrawer from "@/framework/components/core/drawer";

/**
 * 注册全局方法
 * @param app
 */
export function setupGlobalMethods(app: App) {
  app.use(hasPermission);
  app.use(permission);
  // app.use(useFormModal)
  app.use(useModal);
  app.use(useDrawer);
  app.use(useDict);
  // 全局挂载Reflect反射对象,以便在vue模板中使用
  app.config.globalProperties.Reflect = Reflect;
}
